package com.ruoyi.charging.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.charging.mapper.ChargingBillProgressMapper;
import com.ruoyi.charging.domain.ChargingBillProgress;
import com.ruoyi.charging.service.IChargingBillProgressService;

/**
 * 充电进度Service业务层处理
 * 
 * @author ruoyi
 * @date 2023-09-06
 */
@Service
public class ChargingBillProgressServiceImpl implements IChargingBillProgressService 
{
    @Autowired
    private ChargingBillProgressMapper chargingBillProgressMapper;

    /**
     * 查询充电进度
     * 
     * @param id 充电进度主键
     * @return 充电进度
     */
    @Override
    public ChargingBillProgress selectChargingBillProgressById(Integer id)
    {
        return chargingBillProgressMapper.selectChargingBillProgressById(id);
    }

    /**
     * 查询充电进度列表
     * 
     * @param chargingBillProgress 充电进度
     * @return 充电进度
     */
    @Override
    public List<ChargingBillProgress> selectChargingBillProgressList(ChargingBillProgress chargingBillProgress)
    {
        return chargingBillProgressMapper.selectChargingBillProgressList(chargingBillProgress);
    }

    /**
     * 新增充电进度
     * 
     * @param chargingBillProgress 充电进度
     * @return 结果
     */
    @Override
    public int insertChargingBillProgress(ChargingBillProgress chargingBillProgress)
    {
        chargingBillProgress.setCreateTime(DateUtils.getNowDate());
        return chargingBillProgressMapper.insertChargingBillProgress(chargingBillProgress);
    }

    /**
     * 修改充电进度
     * 
     * @param chargingBillProgress 充电进度
     * @return 结果
     */
    @Override
    public int updateChargingBillProgress(ChargingBillProgress chargingBillProgress)
    {
        chargingBillProgress.setUpdateTime(DateUtils.getNowDate());
        return chargingBillProgressMapper.updateChargingBillProgress(chargingBillProgress);
    }

    /**
     * 批量删除充电进度
     * 
     * @param ids 需要删除的充电进度主键
     * @return 结果
     */
    @Override
    public int deleteChargingBillProgressByIds(Integer[] ids)
    {
        return chargingBillProgressMapper.deleteChargingBillProgressByIds(ids);
    }

    /**
     * 删除充电进度信息
     * 
     * @param id 充电进度主键
     * @return 结果
     */
    @Override
    public int deleteChargingBillProgressById(Integer id)
    {
        return chargingBillProgressMapper.deleteChargingBillProgressById(id);
    }
}
